let constant = require('../common/constant');

module.exports = function (req, res, next) {
    console.log('status interceptor');
    var status = req.session.merchant.status;
    console.log(status);
    if ((status == 0) || (status == 2)) {
        console.log('status: ' + status);
        res.json({result: false, code: constant.noPass});
    } else {
        next();
    }
};